package com.github.base.exception;

import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * 通用异常
 * @author zhanghui
 * @date 2024/12/17 下午4:10
 */

@Getter
public class CommonException extends RuntimeException {

    private Integer code = HttpStatus.INTERNAL_SERVER_ERROR.value();

    public CommonException(String message) {
        super(message);
    }

    public CommonException() {
        super();
    }

    public CommonException(Integer code, String message) {
        super(message);
        this.code = code;
    }

}
